import pymongo
from datetime import datetime
mongoClient = pymongo.MongoClient(host='115.159.219.219',port=50017)
dataBase = mongoClient.get_database('WDMBlog')
main_page_ip = dataBase.get_collection('main_page_ip')
print(main_page_ip.find().count())
ipSet = set()
for ip in main_page_ip.find({"create_time":{"$gte":datetime(2017,9,14),"$lt":datetime(2017,9,15)}}):
    #print(str(ip))
    ipSet.add(str(ip['ip_address']))
print(len(ipSet))